package com.ruoyi.accountant.dao;

import com.ruoyi.accountant.domain.Account;
import com.ruoyi.accountant.domain.Inaccount;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.util.Date;
import java.util.List;

public interface InaccountDao extends TempDao<Inaccount, Long> {

    /***
     * 查询没有完成的
     * @param value
     * @return
     */
    List<Inaccount> findAllByFinishedIs(int value);

    /***
     * 查询应该到账的记录
     * @return
     */
    @Query("from Inaccount where endtime <= date(now()) and dtype = '转移'")
    List<Inaccount> findTransferEnd();

}
